﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Page/Site.Master" AutoEventWireup="true" CodeBehind="Import-Order.aspx.cs" Inherits="ERP.Page.Import_Order" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
<script>
    function pageLoad() {
        //-------------------Tooltip-------------------
        Tooltip('.btn-add');
        Tooltip('.btn-delete');
        Tooltip('.btn-excel');
        Tooltip('.btn-search');
        Tooltip('.btn-reload');
        Tooltip('.btn-save');
        Tooltip('.btn');
        Tooltip('.text-num-order');
        Tooltip('.note');
        //--------------------Popup--------------------
        PopupUpdateHeight('#importorder');
        //PopupUpdate('#order');
        PopupUpdate('#materials');
        PopupUpdate('#customer');
        PopupUpdateHeight('#detailmaterials');
        //--------------------DatePicker--------------------
        DatePicker('.textbox_child_text_ngay');
        MarkInputDay('.textbox_child_text_ngay');

        //------------------TabletSort-----------------
        TableSort('#MyTable');
        TableSort('#MyTableMaterials');
        TableSort('#MyTableOrderDetail');
        TableSort('#MyTableCustomer');
    }
</script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<asp:UpdatePanel ID="upDateAll" runat="server">
    <ContentTemplate>
        <!---------------Toolbar---------------->
            <div class="toolbar-main">
                <asp:LinkButton ID="btnAdd" CssClass="btn btn-default btn-sm" runat="server" OnClick="btnAdd_Click"><i class="fa fa-pencil-square-o"></i> Thêm mới</asp:LinkButton>
                <asp:LinkButton ID="btnDelete" CssClass="btn btn-default btn-sm" runat="server" OnClientClick="return confirmCheckIn(this)" OnClick="btnDelete_Click"><i class="fa fa-trash-o"></i> Xoá</asp:LinkButton>
                <asp:TextBox ID="txtSearch" CssClass="textbox-search" runat="server" />
                <asp:LinkButton ID="btnSearch" CssClass="btn btn-default btn-sm" runat="server" OnClick="btnSearch_Click"><i class="fa fa-search"></i> Tìm kiếm</asp:LinkButton>
                <asp:LinkButton ID="btnReload" CssClass="btn btn-default btn-sm" runat="server" OnClick="btnReload_Click"><i class="fa fa-refresh"></i> Làm tươi</asp:LinkButton>
                <asp:LinkButton ID="btnExcel" CssClass="btn btn-default btn-sm" runat="server" OnClick="btnExcel_Click"><i class="fa fa-file-excel-o"></i> Xuất file Excel</asp:LinkButton>
            </div>
        <!---------------Toolbar---------------->
    </ContentTemplate>
    <Triggers>
        <asp:AsyncPostBackTrigger ControlID="btnAdd" EventName="Click" />
        <asp:AsyncPostBackTrigger ControlID="btnDelete" EventName="Click" />
        <asp:AsyncPostBackTrigger ControlID="btnSearch" EventName="Click" />
        <asp:AsyncPostBackTrigger ControlID="btnReload" EventName="Click" />
    </Triggers>
</asp:UpdatePanel>

<!----------------Loading---------------->
<asp:UpdateProgress ID="upDateProcess" runat="server" AssociatedUpdatePanelID="upDateAll">
    <ProgressTemplate>
        <div class="divWaiting">
            <img src="../Images/ajax-loader.gif" alt="Loading"  />
            <span class="process-template-text">Đang tải dữ liệu...</span>
        </div>
    </ProgressTemplate>
</asp:UpdateProgress>
<!--------------Kêt-thúc----------------->

<!-------------Edit-Dữ-Liệu-------------->
<div id="importorder" title="Lập phiếu nhập kho">
    <asp:UpdatePanel ID="upDateOrderBuy" UpdateMode="Conditional" ChildrenAsTriggers="true" runat="server">
        <ContentTemplate>
            <div class="btn-toolbar">
                <div class="btn-group">
                    <asp:LinkButton ID="btnSave" CssClass="btn btn-default btn-sm" runat="server" OnClick="btnSave_Click"><i class="fa fa-floppy-o"></i> Lưu lại</asp:LinkButton>
                    <asp:LinkButton ID="btnReloadPopup" CssClass="btn btn-default btn-sm" runat="server" OnClick="btnReloadPopup_Click"><i class="fa fa-refresh"></i> Làm tươi</asp:LinkButton>
                    <asp:LinkButton ID="btnAddMaterials_Popup"  CssClass="btn btn-default btn-sm" runat="server" OnClick="btnAddMaterials_Popup_Click"><i class="fa fa-refresh"></i> Thêm vật tư</asp:LinkButton>
                </div>
                <label class="validateTips"></label>
                <input type="hidden" id="lbID" runat="server" />
            </div>

            <div class="ui-main-order">
                <ul class="breadcrumb">
                  <li class="active"><span style="color:red"> Thông tin phiếu nhập kho </span></li>
                </ul>

                <div class="col-main">
                    <div class="col-left">
                        <label class="labelpopup">Người lập phiếu <span style="color: Red">(*) </span></label>
                    </div>

                    <div class="col-right">
                        <asp:DropDownList ID="drNguoiLapPhieu" CssClass="textbox_child_text-order-4" runat="server" AutoPostBack="true" AppendDataBoundItems="true" OnSelectedIndexChanged="drNguoiLapPhieu_SelectedIndexChanged">
                            <asp:ListItem Value="-1">--Chọn người lập phiếu--</asp:ListItem>
                        </asp:DropDownList>
                    </div>
                <div class="clr"></div>
                </div>

                <div class="col-main">
                    <div class="col-left">
                        <label class="labelpopup">Bộ phận </label>
                    </div>

                    <div class="col-right">
                        <asp:TextBox ID="txtBoPhan" CssClass="textbox_child_text-order" runat="server"></asp:TextBox>
                    </div>
                <div class="clr"></div>
                </div>

                <div class="col-main">
                    <div class="col-left">
                        <label class="labelpopup">Chức vụ </label>
                    </div>

                    <div class="col-right">
                        <asp:TextBox ID="txtChucVu" CssClass="textbox-muiti-order-3" runat="server"></asp:TextBox>
                    </div>
                <div class="clr"></div>
                </div>

                <div class="col-main">
                    <div class="col-left">
                        <label class="labelpopup">Diễn giải </label>
                    </div>

                    <div class="col-right">
                        <asp:TextBox ID="txtDienGiai" CssClass="textbox-muiti-order" TextMode="MultiLine" runat="server"></asp:TextBox>
                    </div>
                <div class="clr"></div>
                </div>

                <div class="col-main">
                    <div class="col-left">
                        <label class="labelpopup">Ghi chú </label>
                    </div>

                    <div class="col-right">
                        <asp:TextBox ID="txtHinhThucThanhToan" CssClass="textbox-muiti-order-3" runat="server"></asp:TextBox>
                    </div>
                <div class="clr"></div>
                </div>
            </div>

            <div class="ui-main-order-right-1">
                <ul class="breadcrumb">
                  <li class="active"><span style="color:red"> Chứng từ </span></li>
                </ul>

                <div class="col-main">
                    <div class="col-left">
                        <label class="labelpopup">Chứng từ nhập</label>
                    </div>

                    <div class="col-right">
                        <asp:TextBox ID="txtChungTu" data-allow="add" CssClass="textbox_child_text" runat="server"></asp:TextBox>
                    </div>
                <div class="clr"></div>
                </div>
                <div class="clr"></div>
                <div class="col-main">
                    <div class="col-left">
                        <label class="labelpopup">Ngày nhập </label>
                    </div>

                    <div class="col-right">
                        <asp:TextBox ID="txtNgayDatHang" CssClass="textbox_child_text_ngay" runat="server"></asp:TextBox>
                    </div>
                <div class="clr"></div>
                </div>
                <div class="clr"></div>
                <div class="col-main">
                    <div class="col-left">
                        <label class="labelpopup">Chọn chi nhánh </label>
                    </div>

                    <div class="col-right">
                        <asp:DropDownList ID="drChiNhanh" CssClass="textbox_child_text-order-4" runat="server" AutoPostBack="true" OnSelectedIndexChanged="drChiNhanh_SelectedIndexChanged">
                        </asp:DropDownList>
                    </div>
                <div class="clr"></div>
                </div>
                <div class="clr"></div>
                <div class="col-main">
                    <div class="col-left">
                        <label class="labelpopup">Chọn kho </label>
                    </div>

                    <div class="col-right">
                        <asp:DropDownList ID="drChonKho" CssClass="textbox_child_text-order-4" runat="server" AutoPostBack="true" OnSelectedIndexChanged="drChonKho_SelectedIndexChanged">
                        </asp:DropDownList>
                    </div>
                <div class="clr"></div>
                </div>
                <div class="clr"></div>
                <div class="col-main">
                    <div class="col-left">
                        <label class="labelpopup">Chọn phòng chứa </label>
                    </div>

                    <div class="col-right">
                        <asp:DropDownList ID="drPhongChua" CssClass="textbox_child_text-order-4" runat="server" AutoPostBack="true">
                        </asp:DropDownList>
                    </div>
                <div class="clr"></div>
                </div>
            </div>
        </ContentTemplate>
        <Triggers>
            <asp:AsyncPostBackTrigger ControlID="btnSave" EventName="Click" />
            <asp:AsyncPostBackTrigger ControlID="btnReloadPopup" EventName="Click" />
            <asp:AsyncPostBackTrigger ControlID="btnAddMaterials_Popup" EventName="Click" />

            <asp:AsyncPostBackTrigger ControlID="drNguoiLapPhieu" EventName="SelectedIndexChanged" />
            <asp:AsyncPostBackTrigger ControlID="drChiNhanh" EventName="SelectedIndexChanged" />
            <asp:AsyncPostBackTrigger ControlID="drChonKho" EventName="SelectedIndexChanged" />
            <asp:AsyncPostBackTrigger ControlID="drPhongChua" EventName="SelectedIndexChanged" />
        </Triggers>
    </asp:UpdatePanel>
</div>

<div id="materials" title="Thông tin vật tư">
    <asp:UpdatePanel ID="upDateMaterrials" UpdateMode="Conditional" ChildrenAsTriggers="true" runat="server">
        <ContentTemplate>
            <div class="grid-materials">
                <asp:TextBox ID="txtSearchUC" CssClass="textbox_child_search" placeholder="Nhập vào từ khoá tìm kiếm..." runat="server" />
                <div class="btn-group">
                    <asp:LinkButton ID="btnSearchUC" CssClass="btn btn-default btn-sm" runat="server" OnClick="btnSearchUC_Click"><i class="fa fa-search"></i> Tìm kiếm</asp:LinkButton>
                    <asp:LinkButton ID="btnReloadUC" CssClass="btn btn-default btn-sm" runat="server" OnClick="btnReloadUC_Click"><i class="fa fa-refresh"></i> Làm tươi</asp:LinkButton>
                    <asp:LinkButton ID="btnAddMaterials" CssClass="btn btn-default btn-sm" runat="server" OnClick="btnAddMaterials_Click"><i class="fa fa-pencil"></i> Chấp nhận</asp:LinkButton>
                </div>
            </div>
        </ContentTemplate>
        <Triggers>
            <asp:AsyncPostBackTrigger ControlID="btnSearchUC" EventName="Click" />
            <asp:AsyncPostBackTrigger ControlID="btnReloadUC" EventName="Click" />
            <asp:AsyncPostBackTrigger ControlID="btnAddMaterials" EventName="Click" />
        </Triggers>
    </asp:UpdatePanel>

    <asp:UpdateProgress ID="upDateProcessMaterials" runat="server" AssociatedUpdatePanelID="upDateMaterrials">
        <ProgressTemplate>
            <div class="divWaiting">
                <img src="../Images/ajax-loader.gif" alt="Loading"  />
                <span class="process-template-text">Đang tải dữ liệu...</span>
            </div>
        </ProgressTemplate>
    </asp:UpdateProgress>
</div>
<!--------------Kêt-thúc----------------->

<asp:UpdateProgress ID="upDateProcessOrderBy" runat="server" AssociatedUpdatePanelID="upDateOrderBuy">
    <ProgressTemplate>
        <div class="divWaiting">
            <img src="../Images/ajax-loader.gif" alt="Loading"  />
            <span class="process-template-text">Đang tải dữ liệu...</span>
        </div>
    </ProgressTemplate>
</asp:UpdateProgress>
</asp:Content>